package org.jeecg.base.facade;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;
import java.util.Map;

/**
 * @ClassName IFacade
 * @Description:
 * @Date: 0:08 2020/5/20
 * @Author zj
 * @Version
 */
public interface IFacade<V, T> {
    /**
     * @MethodName 将vo转为 Entity
     * @Description:
     * @Param
     * @Return
     * @Date: 8:48 2020/5/20
     * @Author zj
     * @Version 0.0.1
     */
    public T po2Vo(V vo);

    /**
     * @param t
     * @return
     */
    public V vo2Po(T t);

    boolean saveBatch(List<V> list);

    V getById(String id);

    boolean removeByIds(List<String> asList);

    boolean removeById(String id);

    boolean updateById(V vo);

    boolean save(V vo);

    List<V> list(V vo, Map<String, String[]> parameterMap);

    IPage<V> page(Page<V> page, V vo, Map<String, String[]> parameterMap);
}
